package icu.twtool.entity

import java.io.PrintStream

/**
 * 评审结果
 *
 * @param file 答案文件
 * @param count 习题的算式数
 * @param right 正确题目数
 *
 * @author Wen
 * @since 2022-11-01
 */
class JudgeResult(
    private val file: String,
    private val count: Int,
    private val right: Int,
) {

    fun write(out: PrintStream = System.out) {
        out.println("答案：$file")
        out.println("算式总数：$count")
        out.println("正确：$right")
        out.println("错误：${count - right}")
        out.println("得分：${100 * right / count}")
    }
}